From b9ad3172a4a67cbcf2a663dde4770e5604330550 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 12 Nov 2020 16:19:14 +0000 Subject: [PATCH] a11y: Document GtkRevealer's accessible state Use the GROUP role, and make sure to note that the child is always revealed. Unlike GtkExpander, GtkRevealer can only be programmatically toggled, so we cannot turn it into a "button" object. --- gtk/gtkrevealer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c index 716228954c..f0627d456b 100644 --- a/gtk/gtkrevealer.c +++ b/gtk/gtkrevealer.c @@ -53,6 +53,13 @@ * When styling #GtkRevealer using CSS, remember that it only hides its contents, * not itself. That means applied margin, padding and borders will be * visible even when the #GtkRevealer:reveal-child property is set to %FALSE. + * + * # Accessibility + * + * GtkRevealer uses the %GTK_ACCESSIBLE_ROLE_GROUP role. + * + * The child of GtkRevealer, if set, is always available in the accessibility + * tree, regardless of the state of the revealer widget. */ /** @@ -346,6 +353,7 @@ gtk_revealer_class_init (GtkRevealerClass *klass) g_object_class_install_properties (object_class, LAST_PROP, props); gtk_widget_class_set_css_name (widget_class, I_("revealer")); + gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP); } /** -- 2.30.2